<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改菜品</title>
</head>
<body>
<form action="menu/updatemenu.do"  method="post" enctype="multipart/form-data">
<h1 align="center">修改菜品</h1>
<c:forEach items="${menulist}" var="ml">
<table align="center">
     <tr><td><input type="hidden" name="DishId" value=${ml.dishId }></td></tr>
     <tr><td>菜品类别：</td><td><select name="MenuClassid">
	        <option value="1" <c:if test="${ml.menuClassid==1}">selected='selected'</c:if>>饮品</option>
			<option value="2" <c:if test="${ml.menuClassid==2}">selected='selected'</c:if>>中餐</option>
			<option value="3" <c:if test="${ml.menuClassid==3}">selected='selected'</c:if>>西餐</option>
	         </select></td></tr>	         
	<tr><td>菜品名称：</td><td><input type="text" name="DishName" value="${ml.dishName }"></td></tr>	
	<tr><td>菜品价格：</td><td><input type="text" name="DishPrice"value="${ml.dishPrice }">元/份</td></tr>
	<tr><td>菜品状态：</td><td><select name="DishState">
	        <option value="在售" <c:if test="${ml.dishState==在售}">selected='selected'</c:if>>在售</option>
			<option value="停售" <c:if test="${ml.dishState==停售}">selected='selected'</c:if>>停售</option>			
	         </select></td></tr>	            
	<tr><td>菜品图片：</td><td><img alt="图片加载中.." src="upimg/${ml.dishPicture }" style="height:200px;width:300px"></td></tr>	
	<tr><td><span style="color:red">*必须重选</span></td><td><input type="file" name="DishPicture" /></td></tr>
	<tr><td>菜品描述：</td><td><textArea name="dishDescribe" placeholder="${ml.dishDescribe }"></textArea></td></tr>
	<tr><td ><input type="submit" value="保存"/></td> <td><input type="button" value="取消" onclick="rback()"/></td></tr>
</table>
</c:forEach>
</form>
<script type="text/javascript">
function rback(){
	var cf=confirm("确定取消修改？");
	if(cf){window.location.href="menu/manmenu.do" }
}
</script>
</body>
</html>